<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">

<head th:include="templates/common :: header" />

<body>
	<div class="container" style="margin-top: 200px;">
		<div class="row">
			<div class="col-md-4" ></div>
			<div class="col-md-4">
				<div id="feedback" class="span3">
					<div class="alert alert-danger" th:if="${not #strings.isEmpty(status) and status == 'login.failure'}">
						<a class="close">x</a>
						<p class="status" th:if="${not #strings.isEmpty(status)}" th:utext="#{${status}}">Status</p>
					</div>
		
					<div class="alert alert-success" th:if="${not #strings.isEmpty(status) and status == 'logout.success'}">
						<a class="close">x</a>
						<p class="status" th:if="${not #strings.isEmpty(status)}" th:utext="#{${status}}">Status</p>
					</div>
		
					<div class="alert alert-success" th:if="${not #strings.isEmpty(status) and status == 'profile.edit.role.changed'}">
						<a class="close">x</a>
						<p class="status" th:if="${not #strings.isEmpty(status)}" th:utext="#{${status}}">Status</p>
					</div>
				</div>
				
				<div class="panel panel-primary">
					<div class="panel-heading" th:text="#{login.panel.title}"></div>
				  	<div class="panel-body">			
						<form action="#" th:action="@{/j_spring_security_check}" method="post" class="form-horizontal">
							<div class="form-group">
								<label for="j_username" th:text="#{login.username}" class="col-lg-2 control-label">Username</label>
								<div class="col-lg-10">
									<input id="j_username" name="j_username" type="text" required="required" autofocus="autofocus" class="form-control" placeholder="Twój login..." />
								</div>					 
							 </div>
						
							<div class="form-group">
								<label for="j_password" th:text="#{login.password}" class="col-lg-2 control-label">Password</label>
								<div class="col-lg-10">
									<input id="j_password" name="j_password" type="password" required="required" class="form-control" placeholder="Twoje hasło..." />
								</div>					
							</div>
						 	<div class="form-group">
		    					<div class="col-lg-offset-2 col-lg-10">
									<button id="loginButton" type="submit" class="btn btn-block btn-primary" th:text="#{login.button}">Submit</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<div class="col-md-4"></div>
		</div>
	</div>
</body>
</html>